Global Const AF_DLI = 13 ' /* Direct data link interface */
Global Const AF_LAT = 14 ' /* LAT */
Global Const AF_HYLINK = 15 ' /* NSC Hyperchannel */
Global Const AF_APPLETALK = 16 ' /* AppleTalk */
Global Const AF_NETBIOS = 17 ' /* NetBios-style addresses */
Global Const FD_READ = &H1
Global Const FD_WRITE = &H2
Global Const FD_OOB = &H4
Global Const FD_ACCEPT = &H8
Global Const FD_CONNECT = &H10
Global Const FD_CLOSE = &H20
Global Const INVALID_SOCKET = -1
Declare Function Send Lib "winsock" (ByVal s As Integer, ByVal buf As String, ByVal llen As Integer, ByVal flags As Integer) As Integer
Declare Function WSACleanup Lib "winsock" () As Integer
Declare Function CleanSocket Lib "vbsock.vbx" () As Integer
Declare Function OpenSocket Lib "vbsock.vbx" (ByVal PSin_Family As Integer, ByVal PPort As Integer) As Integer
Declare Function InitSocket Lib "vbsock.vbx" () As Integer
Declare Function CloseTheSocket Lib "vbsock.vbx" (ByVal PSocket As Integer) As Integer
Declare Function ConnectSocket Lib "vbsock.vbx" (ByVal PSocket As Integer, ByVal PPort As Integer, ByVal PHost As Long) As Integer
Declare Function OpenSocketWithServer Lib "vbsock.vbx" (ByVal PServerName As String, ByVal PPort As Integer) As Integer
Declare Function SelectSocket Lib "vbsock.vbx" (ByVal PSocket As Integer, ByVal PWnd As Integer, ByVal PWindowMessage As Integer, ByVal PEvent As Long) As Integer
Declare Function listenSocket Lib "vbsock.vbx" (ByVal PSocket As Integer, ByVal BackLog As Integer) As Integer
Declare Function GetSelectEventSocket Lib "vbsock.vbx" (ByVal PParam As Long) As Integer
Declare Function RecvSocket Lib "vbsock.vbx" (ByVal PSocket As Integer, ByVal PBuf As String, ByVal PLen As Integer, ByVal PFlags As Integer) As Integer
Declare Function acceptSocket Lib "vbsock.vbx" (ByVal PSocket As Integer) As Integer
Global Const WSASYSNOTREADY = 10091
Global Const WSAVERNOTSUPPORTED = 10092
Global Const WSAEINVAL = 10022
Global Const BAD_SOCKET = -1
Global Const UNRESOLVED_HOST = -2
Global Const UNABLE_TO_BIND = -3
Global Const UNABLE_TO_CONNECT = -4
' The Base port number both send and recieved are
' calculated from. The values for Client/Server are
' automatically switched. You only need to set this